package com.kuang;

/**
 * ClassName: ThreadTest
 * Description:
 * Date: 2021/3/16 13:59
 * Company: TravelSky
 *
 * @author YangXin
 */
public class ThreadTest2 implements Runnable{


    public static void main(String[] args) {
        //创建Runnable接口的实现对象
        ThreadTest2 threadTest2 = new ThreadTest2();
        //创建线程对象,通过线程对象来开启我们的线程,使用代理
        Thread thread = new Thread(threadTest2);
        thread.start();

        for (int i = 0 ; i < 100; i++){
            System.out.println("学习多线程...");
        }
    }

    @Override
    public void run() {
        //run方法线程体
        for (int i = 0 ; i < 10; i++){
            System.out.println("run方法线程体...");
        }
    }
}
